<!DOCTYPE html>
<html class="iframe-h">

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta name="author" content="ThemeStarz">
    <title>员工管理</title>
    <link rel="stylesheet" type="text/css" href="admin/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="admin/css/admin.css" />
</head>

<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail">
        <form class="layui-form" >
            <div class="layui-form-item">
                <div class="layui-inline">
                    <input type="text" id="no" name="no" value="${admin.no!''}"  placeholder="请输入员工编号" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline">
                    <input type="text" id="name" name="name" value="${admin.name!''}"  placeholder="请输入员工名称" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline">
                    <select id="sex" value="${admin.sex!''}" name="sex" lay-filter="status">
                        <option value="">请选择一个性别</option>
                        <option value="">请选择一个性别</option>
                        <option value="男" <#if admin.sex?default('')="男">selected</#if>>男</option>
                        <option value="女" <#if admin.sex?default('')="女">selected</#if>>女</option>
                    </select>
                </div>
                <button class="layui-btn layui-btn-normal" id="submit" lay-submit="search">搜索</button>
                <a class="layui-btn layui-btn-small layui-btn-normal go-btn" href="/tonewAdmin" lay-submit="search">新增</a>
            </div>
        </form>
        <div class="layui-form" id="table-list">
            <table class="layui-table" lay-even lay-skin="nob">
                <colgroup>
                    <col width="50">
                    <col class="hidden-xs" width="100">
                    <col class="hidden-xs" width="150">
                    <col class="hidden-xs" width="150">
                    <col class="hidden-xs" width="150">
                    <col width="80">
                    <col width="100">
                </colgroup>
                <thead>
                <tr>
                    <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                    <th>员工编号</th>
                    <th class="hidden-xs">员工名称</th>
                    <th class="hidden-xs">员工性别</th>
                    <th class="hidden-xs">员工电话</th>
                    <th class="hidden-xs">所属部门</th>
                    <th class="hidden-xs">操作</th>
                </tr>
                </thead>
                <tbody>
                <#list AdminList as admin>
                <tr>
                    <td><input type="checkbox" name="" lay-skin="primary" data-id="${admin.id!''}"></td>
                    <td class="hidden-xs">${admin.no!''}</td>
                    <td class="hidden-xs">${admin.name!''}</td>
                    <td class="hidden-xs">${admin.sex!''}</td>
                    <td class="hidden-xs">${admin.telephone!''}</td>
                    <td class="hidden-xs">${admin.departmentname!''}</td>
                    <td class="hidden-xs">
                        <div class="layui-inline">
                            <button class="layui-btn layui-btn-small layui-btn-normal go-btn" data-id="${admin.id!''}" data-url="/getadminbyid"><i class="layui-icon">编辑</i></button>
                            <button class="layui-btn layui-btn-small layui-btn-danger go-btn" data-id="${admin.id!''}" data-url="/deletadmin"><i class="layui-icon">删除</i></button>
                        </div>
                    </td>
                </tr>
                </#list>
                </tbody>
            </table>

             <div id="pagination" class="pagination"></div>

            </div>
        </div>
    </div>
    <script src="admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <script src="admin/js/common.js" type="text/javascript" charset="utf-8"></script>
    <link href="admin/dist/pagination.css" rel="stylesheet" type="text/css">
    <link href="page/myPagination.css" rel="stylesheet" type="text/css">
    <script src="admin/js/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="admin/dist/pagination.js"></script>
    <script src="page/myPagination.js"></script>

<script>
    $(function () {
        var pageNum = [[${pageInfo.pageNum}]];
        var pages = [[${pageInfo.pages}]];
        var pageSize = [[${pageInfo.pageSize}]];
        var Total = [[${count}]];
        var no= $("#no").val();
        var name = $("#name").val();
        var sex = $("#sex").val();
        var cyrrentpage='';
        new Page({
            id: 'pagination',
            pageTotal: pages, //必填,总页数
            pageAmount: pageSize, //每页多少条
            dataTotal: Total,//总共多少条数据
            curPage:pageNum, //初始页码,不填默认为1
            pageSize: pages, //分页个数,不填默认为5
            showPageTotalFlag:true, //是否显示数据统计,不填默认不显示
            showSkipInputFlag:true, //是否支持跳转,不填默认不显示
            getPage: function (page) {
                //获取当前页数
                cyrrentpage=page;
                window.location.href = encodeURI('/getAlladmin?pageNum=' + page+'&no='+no+'&name='+name+'&sex='+sex);

            }
        })

    })
</script>
</body>


</html>